namespace AwesomiumDotNet
{
	/// <summary>
	/// Windows keyboard messages,
	/// used with WebView.InjectKeyboardEvent
	/// </summary>
	public enum class WM : Int32
	{
		KeyDown = WM_KEYDOWN,
		KeyUp = WM_KEYUP,
		Char = WM_CHAR,
		DeadChar = WM_DEADCHAR,
		SysKeyDown = WM_SYSKEYDOWN,
		SysKeyUp = WM_SYSKEYUP,
		SysChar = WM_SYSCHAR,
		SysDeadChar = WM_SYSDEADCHAR,
		UniChar = WM_UNICHAR,
		KeyFirst = WM_KEYFIRST,
		KeyLast = WM_KEYLAST,
	};

	public enum class KeyboardEventType
	{
		KeyDownType, /// Key-Down type
		KeyUpType,   /// Key-Up type
		CharType     /// Character input type
	};

#ifndef VERSION_108

	public ref class WebKeyboardEvent
	{
	private:
		Awesomium::WebKeyboardEvent* keyboardEvent;

	public:
		property KeyboardEventType EventType
		{
			KeyboardEventType get() { return (KeyboardEventType)keyboardEvent->type; }
			void set(KeyboardEventType value)
			{
				keyboardEvent->type = (Awesomium::WebKeyboardEvent::Type)value;
			}
		}

		property bool IsSystemKey
		{
			bool get() { return keyboardEvent->isSystemKey; }
			void set(bool value) { keyboardEvent->isSystemKey = value; }
		}

		property int Modifiers
		{
			int get() { return keyboardEvent->modifiers; }
			void set(int value) { keyboardEvent->modifiers = value; }
		}

		property int NativeKeyCode
		{
			int get() { return keyboardEvent->nativeKeyCode; }
			void set(int value) { keyboardEvent->nativeKeyCode = value; }
		}

		property int VirtualKeyCode
		{
			int get() { return keyboardEvent->virtualKeyCode; }
			void set(int value) { keyboardEvent->virtualKeyCode = value; }
		}

		WebKeyboardEvent()
		{
			keyboardEvent = new Awesomium::WebKeyboardEvent();
		}

		WebKeyboardEvent(WM msg, WPARAM wParam, LPARAM lParam)
		{
			keyboardEvent = new Awesomium::WebKeyboardEvent((UINT)msg, wParam, lParam);
		}

		WebKeyboardEvent(UINT msg, WPARAM wParam, LPARAM lParam)
		{
			keyboardEvent = new Awesomium::WebKeyboardEvent(msg, wParam, lParam);
		}

	internal:
		Awesomium::WebKeyboardEvent ToNative()
		{
			return *keyboardEvent;
		}
	};

#endif
};
